//
//  BTRMenuViewCtr.m
//  Chat_WeiXin
//
//  Created by geek-group on 14-7-1.
//  Copyright (c) 2014年 Benster. All rights reserved.
//

#import "BTRMenuViewCtr.h"

#import "BTRWeChatListViewCtr.h"
#import "BTRContactViewCtr.h"
#import "BTRProFileViewCtr.h"
#import "BTRNewsListViewCtr.h"

@interface BTRMenuViewCtr ()

@end

@implementation BTRMenuViewCtr

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
        BTRWeChatListViewCtr *weChatList = [[BTRWeChatListViewCtr alloc] init];
        weChatList.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"聊天" image:[UIImage imageNamed:@"WeChat"] tag:0];
        
        BTRContactViewCtr *contact = [[BTRContactViewCtr alloc] init];
        contact.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"联系人" image:[UIImage imageNamed:@"Contact"] tag:0];
        
        BTRNewsListViewCtr *newsList = [[BTRNewsListViewCtr alloc] init];
        newsList.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"发现" image:[UIImage imageNamed:@"SNS"] tag:0];
        
        BTRProFileViewCtr *proFile = [[BTRProFileViewCtr alloc] init];
        proFile.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我" image:[UIImage imageNamed:@"Profile"] tag:0];
        
        self.viewControllers = [NSArray arrayWithObjects:weChatList, contact, newsList, proFile,nil];
        
        UIColor *color = [UIColor colorWithRed:0.176 green:0.576 blue:0.980 alpha:1.000];
        [self.tabBar setBackgroundImage:[UIImage imageNamed:@"tabbarBkg"]];
        [self.tabBar setSelectedImageTintColor:color];
    }
    return self;
}

- (void)viewDidLoad
{
    //设置进入菜单主界面之后 去掉back按钮
    [self.navigationItem setHidesBackButton:YES animated:YES];
    [super viewDidLoad];
}

@end
